import 'antd/dist/antd.css';
// import styles from './index.css';
import http_utils from '@/utils/http_utils';
import React from 'react';
// import { Layout, Space } from 'antd';
//
// import { SearchOutlined } from '@ant-design/icons/lib';
// import { Link } from 'react-router-dom';

import Basic from './basic';
import BlankLayout from '@/layouts/blank';
import AdminLayout from '@/layouts/admin';

// const { Footer } = Layout;
// const titleContent = '我的兴趣爱好分享', titleDesc = '即时记录的学习笔记';

window.$http = http_utils;

// const tabUri = {
//   '/': 'Home',
//   '/category': 'Category',
//   '/tag': 'Tag',
//   '/about': 'About',
//   '/search': 'Search',
// };

function BasicLayout(props) {
  // const titleContent = 'Aglaia', titleDesc = 'desc';

  switch (props.location.pathname) {
    case '/admin/login':
      return <BlankLayout>
        {props.children}
      </BlankLayout>;
    case '/admin/manage' || '/admin/write':
      return <AdminLayout>
        {props.children}
      </AdminLayout>;
    default:
  }

  return (
    <Basic>
      {props.children}
    </Basic>
  );
}

export default BasicLayout;


// ref: https://umijs.org/config/
// import http_utils from '@/utils/http_utils';

// window.$http = http_utils

